package com.itheima;

import com.itheima.reggie.ReggieTakeOutApplication;
import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.entity.Dish;
import org.junit.jupiter.api.Test;
import org.springframework.beans.BeanUtils;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.DigestUtils;

import java.time.LocalDateTime;

@SpringBootTest(classes = ReggieTakeOutApplication.class)
public class test {
    @Test
    public void testGet(){
        String s = DigestUtils.md5DigestAsHex("123456".getBytes());
        System.out.println(s);
        System.out.println(LocalDateTime.now());
    }
    @Test
    public void testBean(){
        Dish dish = new Dish();
        dish.setName("name");

        DishDto dishDto = new DishDto();

        BeanUtils.copyProperties(dish, dishDto);

        System.out.println(dishDto.getName());


    }


}
